<template>
  <div>
    <div v-if="!isDisabled">
      <!-- banner -->
      <game-banner ref="gameBanner" @getTrainInfoSuccess="trainInfoSuccess" />

      <div class="game_page">
        <router-view :train-info="trainInfo" />
      </div>
    </div>
    <div v-else>

      <div class="gl_noData">

        <p class="noData">
          <span>
            当前培训已被禁用，请联系平台管理员
          </span>
        </p>

      </div>
    </div>
  </div>
</template>

<script>
import gameBanner from './components/gameBanner';

export default {
  components: {
    gameBanner
  },
  data () {
    return {
      isDisabled: false,
      trainInfo: {}
    };
  },
  methods: {
    trainInfoSuccess (data) {
      this.trainInfo = data;
    }
  }
};

</script>
<style scoped>
.noData {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}
</style>
